{include file="public/header" /}


<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>模板消息设置</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">           
                    <div class="panel-body">      
                     <div class="row search-form">
                        <div class="col-sm-12">   
                    
               
                            <div class="fl">
                                <div class="tools">
                                    <a class="btn btn-primary" href="{:url('add')}">新 增</a>
									<a class="btn btn-primary" href="{:url('send')}">发模板消息</a>									
                                    
                                </div>        

                            </div>
                        </div>
                    </div>


                    <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th>ID</th>
								<th>模板名称</th>
                                <th>模板id</th>
								<th>系统模板code</th>
								<th>描述</th>
								<th>创建时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>

                           {volist name="list_data" id="vo"}
                            <tr class="long-td">
                                <td>{$vo.id}</td>
								<td>{$vo.name}</td>
                                <td>{$vo.tpl_id}</td>
								<td>{$vo.tpl_code}</td>
								<td>{$vo.desc}</td>
								<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                                <td>
                                        <a href="{:url('edit',['id'=>$vo['id']])}" class="btn btn-primary btn-xs">
                                            <i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
                                        <a href="javascript:;"  onclick="del({$vo.id},this)"  class="btn btn-danger btn-xs">
                                            <i class="fa fa-trash-o"></i> 删除</a>
                                </td>
                            </tr>
                            {/volist}                                            
                        
                    </table>

                </div>
            </div>

                    <!-- 分页 -->
                    <div id="Pages">  {$page} </div>

                </div>
                </div>

                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript">

function del(id, _this){
    if(!confirm('确认删除？')) return false;

    $(_this).parent().parent().remove();
    $.post("{:url('del')}",{id:id},function(data){
    });
}
</script>
</body>
</html>
